package xian.woniuxy.hisbe.entity;

import java.util.ArrayList;
import java.util.List;

public class PrescriptionExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public PrescriptionExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andPresIdIsNull() {
            addCriterion("pres_id is null");
            return (Criteria) this;
        }

        public Criteria andPresIdIsNotNull() {
            addCriterion("pres_id is not null");
            return (Criteria) this;
        }

        public Criteria andPresIdEqualTo(Integer value) {
            addCriterion("pres_id =", value, "presId");
            return (Criteria) this;
        }

        public Criteria andPresIdNotEqualTo(Integer value) {
            addCriterion("pres_id <>", value, "presId");
            return (Criteria) this;
        }

        public Criteria andPresIdGreaterThan(Integer value) {
            addCriterion("pres_id >", value, "presId");
            return (Criteria) this;
        }

        public Criteria andPresIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("pres_id >=", value, "presId");
            return (Criteria) this;
        }

        public Criteria andPresIdLessThan(Integer value) {
            addCriterion("pres_id <", value, "presId");
            return (Criteria) this;
        }

        public Criteria andPresIdLessThanOrEqualTo(Integer value) {
            addCriterion("pres_id <=", value, "presId");
            return (Criteria) this;
        }

        public Criteria andPresIdIn(List<Integer> values) {
            addCriterion("pres_id in", values, "presId");
            return (Criteria) this;
        }

        public Criteria andPresIdNotIn(List<Integer> values) {
            addCriterion("pres_id not in", values, "presId");
            return (Criteria) this;
        }

        public Criteria andPresIdBetween(Integer value1, Integer value2) {
            addCriterion("pres_id between", value1, value2, "presId");
            return (Criteria) this;
        }

        public Criteria andPresIdNotBetween(Integer value1, Integer value2) {
            addCriterion("pres_id not between", value1, value2, "presId");
            return (Criteria) this;
        }

        public Criteria andPatIdIsNull() {
            addCriterion("pat_id is null");
            return (Criteria) this;
        }

        public Criteria andPatIdIsNotNull() {
            addCriterion("pat_id is not null");
            return (Criteria) this;
        }

        public Criteria andPatIdEqualTo(Integer value) {
            addCriterion("pat_id =", value, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdNotEqualTo(Integer value) {
            addCriterion("pat_id <>", value, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdGreaterThan(Integer value) {
            addCriterion("pat_id >", value, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("pat_id >=", value, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdLessThan(Integer value) {
            addCriterion("pat_id <", value, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdLessThanOrEqualTo(Integer value) {
            addCriterion("pat_id <=", value, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdIn(List<Integer> values) {
            addCriterion("pat_id in", values, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdNotIn(List<Integer> values) {
            addCriterion("pat_id not in", values, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdBetween(Integer value1, Integer value2) {
            addCriterion("pat_id between", value1, value2, "patId");
            return (Criteria) this;
        }

        public Criteria andPatIdNotBetween(Integer value1, Integer value2) {
            addCriterion("pat_id not between", value1, value2, "patId");
            return (Criteria) this;
        }

        public Criteria andPharIdIsNull() {
            addCriterion("phar_id is null");
            return (Criteria) this;
        }

        public Criteria andPharIdIsNotNull() {
            addCriterion("phar_id is not null");
            return (Criteria) this;
        }

        public Criteria andPharIdEqualTo(Integer value) {
            addCriterion("phar_id =", value, "pharId");
            return (Criteria) this;
        }

        public Criteria andPharIdNotEqualTo(Integer value) {
            addCriterion("phar_id <>", value, "pharId");
            return (Criteria) this;
        }

        public Criteria andPharIdGreaterThan(Integer value) {
            addCriterion("phar_id >", value, "pharId");
            return (Criteria) this;
        }

        public Criteria andPharIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("phar_id >=", value, "pharId");
            return (Criteria) this;
        }

        public Criteria andPharIdLessThan(Integer value) {
            addCriterion("phar_id <", value, "pharId");
            return (Criteria) this;
        }

        public Criteria andPharIdLessThanOrEqualTo(Integer value) {
            addCriterion("phar_id <=", value, "pharId");
            return (Criteria) this;
        }

        public Criteria andPharIdIn(List<Integer> values) {
            addCriterion("phar_id in", values, "pharId");
            return (Criteria) this;
        }

        public Criteria andPharIdNotIn(List<Integer> values) {
            addCriterion("phar_id not in", values, "pharId");
            return (Criteria) this;
        }

        public Criteria andPharIdBetween(Integer value1, Integer value2) {
            addCriterion("phar_id between", value1, value2, "pharId");
            return (Criteria) this;
        }

        public Criteria andPharIdNotBetween(Integer value1, Integer value2) {
            addCriterion("phar_id not between", value1, value2, "pharId");
            return (Criteria) this;
        }

        public Criteria andDocIdIsNull() {
            addCriterion("doc_id is null");
            return (Criteria) this;
        }

        public Criteria andDocIdIsNotNull() {
            addCriterion("doc_id is not null");
            return (Criteria) this;
        }

        public Criteria andDocIdEqualTo(Integer value) {
            addCriterion("doc_id =", value, "docId");
            return (Criteria) this;
        }

        public Criteria andDocIdNotEqualTo(Integer value) {
            addCriterion("doc_id <>", value, "docId");
            return (Criteria) this;
        }

        public Criteria andDocIdGreaterThan(Integer value) {
            addCriterion("doc_id >", value, "docId");
            return (Criteria) this;
        }

        public Criteria andDocIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("doc_id >=", value, "docId");
            return (Criteria) this;
        }

        public Criteria andDocIdLessThan(Integer value) {
            addCriterion("doc_id <", value, "docId");
            return (Criteria) this;
        }

        public Criteria andDocIdLessThanOrEqualTo(Integer value) {
            addCriterion("doc_id <=", value, "docId");
            return (Criteria) this;
        }

        public Criteria andDocIdIn(List<Integer> values) {
            addCriterion("doc_id in", values, "docId");
            return (Criteria) this;
        }

        public Criteria andDocIdNotIn(List<Integer> values) {
            addCriterion("doc_id not in", values, "docId");
            return (Criteria) this;
        }

        public Criteria andDocIdBetween(Integer value1, Integer value2) {
            addCriterion("doc_id between", value1, value2, "docId");
            return (Criteria) this;
        }

        public Criteria andDocIdNotBetween(Integer value1, Integer value2) {
            addCriterion("doc_id not between", value1, value2, "docId");
            return (Criteria) this;
        }

        public Criteria andPresInfoIsNull() {
            addCriterion("pres_info is null");
            return (Criteria) this;
        }

        public Criteria andPresInfoIsNotNull() {
            addCriterion("pres_info is not null");
            return (Criteria) this;
        }

        public Criteria andPresInfoEqualTo(String value) {
            addCriterion("pres_info =", value, "presInfo");
            return (Criteria) this;
        }

        public Criteria andPresInfoNotEqualTo(String value) {
            addCriterion("pres_info <>", value, "presInfo");
            return (Criteria) this;
        }

        public Criteria andPresInfoGreaterThan(String value) {
            addCriterion("pres_info >", value, "presInfo");
            return (Criteria) this;
        }

        public Criteria andPresInfoGreaterThanOrEqualTo(String value) {
            addCriterion("pres_info >=", value, "presInfo");
            return (Criteria) this;
        }

        public Criteria andPresInfoLessThan(String value) {
            addCriterion("pres_info <", value, "presInfo");
            return (Criteria) this;
        }

        public Criteria andPresInfoLessThanOrEqualTo(String value) {
            addCriterion("pres_info <=", value, "presInfo");
            return (Criteria) this;
        }

        public Criteria andPresInfoLike(String value) {
            addCriterion("pres_info like", value, "presInfo");
            return (Criteria) this;
        }

        public Criteria andPresInfoNotLike(String value) {
            addCriterion("pres_info not like", value, "presInfo");
            return (Criteria) this;
        }

        public Criteria andPresInfoIn(List<String> values) {
            addCriterion("pres_info in", values, "presInfo");
            return (Criteria) this;
        }

        public Criteria andPresInfoNotIn(List<String> values) {
            addCriterion("pres_info not in", values, "presInfo");
            return (Criteria) this;
        }

        public Criteria andPresInfoBetween(String value1, String value2) {
            addCriterion("pres_info between", value1, value2, "presInfo");
            return (Criteria) this;
        }

        public Criteria andPresInfoNotBetween(String value1, String value2) {
            addCriterion("pres_info not between", value1, value2, "presInfo");
            return (Criteria) this;
        }

        public Criteria andPresIspayIsNull() {
            addCriterion("pres_ispay is null");
            return (Criteria) this;
        }

        public Criteria andPresIspayIsNotNull() {
            addCriterion("pres_ispay is not null");
            return (Criteria) this;
        }

        public Criteria andPresIspayEqualTo(Boolean value) {
            addCriterion("pres_ispay =", value, "presIspay");
            return (Criteria) this;
        }

        public Criteria andPresIspayNotEqualTo(Boolean value) {
            addCriterion("pres_ispay <>", value, "presIspay");
            return (Criteria) this;
        }

        public Criteria andPresIspayGreaterThan(Boolean value) {
            addCriterion("pres_ispay >", value, "presIspay");
            return (Criteria) this;
        }

        public Criteria andPresIspayGreaterThanOrEqualTo(Boolean value) {
            addCriterion("pres_ispay >=", value, "presIspay");
            return (Criteria) this;
        }

        public Criteria andPresIspayLessThan(Boolean value) {
            addCriterion("pres_ispay <", value, "presIspay");
            return (Criteria) this;
        }

        public Criteria andPresIspayLessThanOrEqualTo(Boolean value) {
            addCriterion("pres_ispay <=", value, "presIspay");
            return (Criteria) this;
        }

        public Criteria andPresIspayIn(List<Boolean> values) {
            addCriterion("pres_ispay in", values, "presIspay");
            return (Criteria) this;
        }

        public Criteria andPresIspayNotIn(List<Boolean> values) {
            addCriterion("pres_ispay not in", values, "presIspay");
            return (Criteria) this;
        }

        public Criteria andPresIspayBetween(Boolean value1, Boolean value2) {
            addCriterion("pres_ispay between", value1, value2, "presIspay");
            return (Criteria) this;
        }

        public Criteria andPresIspayNotBetween(Boolean value1, Boolean value2) {
            addCriterion("pres_ispay not between", value1, value2, "presIspay");
            return (Criteria) this;
        }

        public Criteria andPresIsmeddoneIsNull() {
            addCriterion("pres_ismeddone is null");
            return (Criteria) this;
        }

        public Criteria andPresIsmeddoneIsNotNull() {
            addCriterion("pres_ismeddone is not null");
            return (Criteria) this;
        }

        public Criteria andPresIsmeddoneEqualTo(Boolean value) {
            addCriterion("pres_ismeddone =", value, "presIsmeddone");
            return (Criteria) this;
        }

        public Criteria andPresIsmeddoneNotEqualTo(Boolean value) {
            addCriterion("pres_ismeddone <>", value, "presIsmeddone");
            return (Criteria) this;
        }

        public Criteria andPresIsmeddoneGreaterThan(Boolean value) {
            addCriterion("pres_ismeddone >", value, "presIsmeddone");
            return (Criteria) this;
        }

        public Criteria andPresIsmeddoneGreaterThanOrEqualTo(Boolean value) {
            addCriterion("pres_ismeddone >=", value, "presIsmeddone");
            return (Criteria) this;
        }

        public Criteria andPresIsmeddoneLessThan(Boolean value) {
            addCriterion("pres_ismeddone <", value, "presIsmeddone");
            return (Criteria) this;
        }

        public Criteria andPresIsmeddoneLessThanOrEqualTo(Boolean value) {
            addCriterion("pres_ismeddone <=", value, "presIsmeddone");
            return (Criteria) this;
        }

        public Criteria andPresIsmeddoneIn(List<Boolean> values) {
            addCriterion("pres_ismeddone in", values, "presIsmeddone");
            return (Criteria) this;
        }

        public Criteria andPresIsmeddoneNotIn(List<Boolean> values) {
            addCriterion("pres_ismeddone not in", values, "presIsmeddone");
            return (Criteria) this;
        }

        public Criteria andPresIsmeddoneBetween(Boolean value1, Boolean value2) {
            addCriterion("pres_ismeddone between", value1, value2, "presIsmeddone");
            return (Criteria) this;
        }

        public Criteria andPresIsmeddoneNotBetween(Boolean value1, Boolean value2) {
            addCriterion("pres_ismeddone not between", value1, value2, "presIsmeddone");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}